package com.jxud.service.impl;

import com.jxud.Pojo.PrivacyPolicy;
import com.jxud.mapper.PrivacyPolicyMapper;
import com.jxud.service.PrivacyPolicyService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PrivacyPolicyServiceImpi implements PrivacyPolicyService {
    @Autowired
    private PrivacyPolicyMapper privacyPolicyMapper;

    @Override
    public PrivacyPolicy getActivePolicy() {
        return privacyPolicyMapper.PrivacyPolicyMapper()
                .orElseThrow(() -> new RuntimeException("未找到生效的隐私政策"));
    }
}
